package com.bjpowernode.services;

import com.bjpowernode.exception.MyException;

import java.util.ArrayList;

public interface BaseServices<T,I> {
    String ERROR_MESS_NO_QUERY="没有查询到数据";
    String ERROR_MESS_ADD_NOTROWS="添加失败";
    String ERROR_MESS_EDIT_NOTROWS="修改失败";
    String ERROR_MESS_DEL_NOTROWS="删除失败";

    ArrayList<T> getAll();

    T get(I id) throws MyException;

    void add(T t) throws MyException;

    void edit(T t) throws MyException;

    void del(I id) throws MyException;
}
